package com.wanxi.spring.cloud.role.mapper;


import com.wanxi.spring.cloud.role.model.Permission;
import com.wanxi.spring.cloud.role.model.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 蒋帆
 * @since 2020-12-21
 */
public interface RoleMapper {

    List<Role> getRoles(@Param("page") Integer page, @Param("limit") Integer limit);

    long getRolesCount();

    int updateRole(Role role);

    int deleteRole(Integer id);

    List<Permission> getRolePermissions(Integer id);

    List<Role> getRoleList();

    int addRole(Role role);
}
